{% extends "base.html" %}
{% block css %}
<link rel="stylesheet" href="/static/css/admin.css" />
{% endblock %}
{% block nav %}
   <div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">

        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a class="brand" href="/admin/">Googler Admin</a>
        <div class="nav-collapse">
          <ul class="nav">

            <li class="active"><a href="/admin/">Home</a></li>

          </ul>
        </div>
      </div>
    </div>
  </div>
{% endblock %}

{% block content %}
<div class="alert" style="display:none"></div>

<form class="form-horizontal" method="POST" action="/admin/addcurators">
  <fieldset>
    <legend>{{ organization.name }}</legend>
    <div class="control-group">
      <label for="input01" class="control-label">Email address</label>
      <div class="controls">
        <textarea name="curators"></textarea>
        <input type="hidden" name="org_key" value="{{organization.key}}">
        <p class="help-block">Enter curator's gmail address, one per line</p>

      </div>
    </div>
<div class="form-actions">
             <button class="btn btn-primary" type="submit">Add Partners</button>

          </div>
  </fieldset>
</form>


<h3>All Existing Curators</h3>
<table class="table">
  <tr>
    <th>Email</th>
    <th>Date added</th>
    <th></th>
  </tr>
  {% for user in curators %}
  <tr>
    <td>{{user.username.username}}</td>
    <td>{{user.username.added_date}}</td>
    <td>
      <form action="/admin/addcurators" method="post">
        <input type="hidden" name="org_key" value="{{organization.key}}">
        <input type="hidden" name="action" value="delete">
        <input type="hidden" name="curators" value="{{ user.username.username}}">
        <button class="btn btn-primary" type="submit">Delete</button>
      </form>
    </td>
  </tr>
  {% endfor %}
</table>



{% endblock %}

{% block main_js_load %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script src="/static/js/admin.js"></script>
{% endblock %}


